﻿using Interface.Cache;
using Interface.Core.Controllers;
using Interface.Core.Utility;
using Interface.Mvc.Areas.Scrm.Models;
using Interface.Redis;
using Interface.Utility.Helper;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Interface.Mvc.Areas.Scrm.Controllers
{
    public class SksController : CoreController
    {
        /// 登录
        /// url: /scrm/sks/mobilelogin
        [HttpPost]
        public string mobilelogin(string phone, string password, string versioninfo, string machinecode, string phonemodel)
        {
            var re = db.sks.StoredQuery<dynamic>("MB_Sp_MobileLogin", new
            {
                phone,
                password,
                versioninfo,
                machinecode,
                phonemodel
            }).FirstOrDefault();

            return ResultUtility.UnknownResult(re.success, re.imessage, re.imessage, data: re);
        }

    }
}
